﻿/*****************************************************************//**
 * @file    FITKViewAdaptorSketch2DPreview.h
 * @brief   Graph object data adaptor for previewing the 2D sketch with
 *          current construction line.
 *  
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2025-01-02
 *********************************************************************/

#ifndef __FITKVIEWADAPTORSKETCH2DPREVIEW_H__
#define __FITKVIEWADAPTORSKETCH2DPREVIEW_H__

#include "FITKVTKViewAdaptorBase.h"

#include "FITKVTKGraphAdaptorAPI.h"

namespace Exchange
{
    /**
     * @brief   Graph object data adaptor  for previewing the sketch2D with
     *          current construction line.
     * @author  ChengHaotian (yeguangbaozi@foxmail.com)
     * @date    2025-01-02
     */
    class FITKVTKGRAPHADAPTORAPI FITKViewAdaptorSketch2DPreview : public FITKVTKViewAdaptorBase
    {
        // Regist
        FITKCLASS(Exchange, FITKViewAdaptorSketch2DPreview);

    public:
        /**
         * @brief   Constructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2025-01-02
         */
        explicit FITKViewAdaptorSketch2DPreview() = default;

        /**
         * @brief   Destructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2025-01-02
         */
        ~FITKViewAdaptorSketch2DPreview() = default;

        /**
         * @brief   Execute the data exchange.[override]
         * @return  Is OK
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2025-01-02
         */
        bool update() override;

    };

    // Regist 2D sketch preview adaptor
    Register2FITKViewAdaptorFactory(GeoSketch2DPreview, Interface::FITKAbsGeoSketch2D, FITKViewAdaptorSketch2DPreview);
}   // namespace Exchange

#endif // __FITKVIEWADAPTORSKETCH2DPREVIEW_H__